using UnityEngine;
using SceneManager = UnityEngine.SceneManagement.SceneManager;

namespace HCore.Tests.Runtime.ShootingEditor2D.Scripts.ViewController.GamePlay
{
    public class NextLevel : MonoBehaviour
    {
        [SerializeField] public string NextLevelName;

        private void OnTriggerEnter2D(Collider2D other)
        {
            if (other.CompareTag("Player")) SceneManager.LoadScene(NextLevelName);
        }
    }
}